<d-layout class="layout">
  <div class="layout-wrapper">
    <d-header>
      <div class="top">
        <div class="title">
          <img [src]="logoSrc" />
          <div class="text">NE框架</div>
        </div>
        <div class="ctrl">
          <d-icon-group>
            <d-icon [operable]="true" icon="icon-minus" (click)="minimizeLoginWin()"> </d-icon>
            <d-icon [operable]="true" icon="icon-close" (click)="quitLoginWin()"> </d-icon>
          </d-icon-group>
        </div>
      </div>
      <div class="sub-title">
        <div class="welcome">欢迎登录</div>
        <div class="text"></div>
      </div>
    </d-header>
    <d-content>
      <form dForm class="form">
        <div class="item">
          <div class="label">
            <fa-icon [icon]="faUser"></fa-icon>
          </div>
          <div class="value">
            <d-form-control>
              <input dTextInput autocomplete="off" name="userName" placeholder="请输入登录账号" [(ngModel)]="formData.account" />
            </d-form-control>
          </div>
        </div>
        <div class="item">
          <div class="label">
            <fa-icon [icon]="faUnlockKeyhole"></fa-icon>
          </div>
          <div class="value">
            <d-form-control [suffixTemplate]="suffixTemplate">
              <input
                dTextInput
                name="inputPassword"
                [type]="showPassword ? 'text' : 'password'"
                placeholder="请输入密码"
                [(ngModel)]="formData.password"
              />
            </d-form-control>
            <ng-template #suffixTemplate>
              <i
                [class]="showPassword ? 'icon icon-preview' : 'icon icon-preview-forbidden'"
                (click)="showPassword = !showPassword"
                style="font-size: 18px"
              ></i>
            </ng-template>
          </div>
        </div>
        <div class="item">
          <div class="label"></div>
          <div class="option">
            <d-checkbox color="#526ecc" label="记住密码"></d-checkbox>
            <d-button bsStyle="text">
              <span class="text">注册账号</span>
            </d-button>
          </div>
        </div>
        <div class="item">
          <div class="label"></div>
          <div class="value">
            <d-button bsSize="lg" width="255px" (click)="submitLogin()">登录</d-button>
          </div>
        </div>
      </form>
    </d-content>
    <d-footer>基于NestJS+Electron实现的桌面软件开发框架</d-footer>
  </div>
</d-layout>
